aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/invoice/[id]
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/invoice/[id]')
-rw-r--r--src/routes/invoice/[id]/+page.server.js3
-rw-r--r--src/routes/invoice/[id]/+page.svelte4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/routes/invoice/[id]/+page.server.js b/src/routes/invoice/[id]/+page.server.js
index 5ab0069a..e123c7d7 100644
--- a/src/routes/invoice/[id]/+page.server.js
+++ b/src/routes/invoice/[id]/+page.server.js
@@ -1,5 +1,4 @@
-import cookie from 'cookie';
-import { get, post } from '$lib/utils';
+import { get } from '$lib/utils';
export async function load({ params }) {
let { id } = params;
diff --git a/src/routes/invoice/[id]/+page.svelte b/src/routes/invoice/[id]/+page.svelte
index e8d5562c..f6ecdc0e 100644
--- a/src/routes/invoice/[id]/+page.svelte
+++ b/src/routes/invoice/[id]/+page.svelte
@@ -69,9 +69,9 @@
let update = async () => {
await tick();
- tip = (tipAmount * 100000000) / rate;
+ tip = Math.round((tipAmount * 100000000) / rate);
let r = await post(`/invoice`, {
- amount: amount + tip,
+ amount: parseInt(amount + tip),
rate,
tip,
text,